<%@ page import="com.opensymphony.xwork2.util.ValueStack" %>
<%@ page import="exam.StatisticInfo" %>
<%@ page import="java.util.List" %>
<%@ page import="account.AccountUtils" %>
<%@ page import="utils.Var" %>
<%@ page import="java.text.DecimalFormat" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
  <title></title>
  <link href="../../skin/default/global.css" rel="stylesheet" type="text/css"/>
  <link href="../../skin/default/layout.css" rel="stylesheet" type="text/css"/>
   <style>
    html,body{overflow-x:hidden}
    </style>
</head>
<%
  if (!AccountUtils.hasRight(session, Var.RIGHT_STATISTIC)) throw new Exception("deny!");
  
  ValueStack vs = (ValueStack) request.getAttribute("struts.valueStack");
  List<StatisticInfo> list = (List<StatisticInfo>) vs.findValue("slist");
  String from = (String) vs.findValue("from");
  String to = (String) vs.findValue("to");
  String pxjg = (String) vs.findValue("pxjg");
%>
<body class="admin-content admin-panel-body">

<!--<div class="icon" id="stat"></div>-->

<!--<h1 class="title stat">发发发驾校（2009年11月05日 至 2009年11月05日）</h1>-->

<%--<div class="admin-tablenav" style="float:right; margin-bottom:-14px;padding-right:8px;">--%>
  <%--<button type="button" class="normal" onclick="KS.print('getPassRatePrint.action?from=<%=from%>&to=<%=to%>&pxjg=<%=pxjg%>')"><span></span><img src="../../skin/default/print.gif"/>打印列表</button>--%>
<!--</div>-->

<!--通过率列表-->
<table cellpadding="0" cellspacing="0" class="admin-table" style="width:98%">
  <thead>
    <tr>
      <th><span class="first"></span>培训机构</th>
      <th style="width:60px">总人数</th>
      <th style="width:60px">及格</th>
      <th style="width:60px">不及格</th>
      <th style="width:60px">及格率</th>
      <th style="width:60px;" class="last">平均分</th>
    </tr>
  </thead>
  <tbody id="statlist1">
    <%
      if(list.size() == 0){
    %>
    <tr>
      <td colspan="6" class="first last">
        <div class="notice">查询结果为空</div>
      </td>
    </tr>
    <%
      }
      for(StatisticInfo info : list){
        DecimalFormat df = new DecimalFormat("###.00");
        String passrate = df.format((float) info.getPass() / info.getSum() * 100);
    %>
    <tr>
      <td class="first"><%=info.getPxjg()%></td>
      <td><%=info.getSum()%></td>
      <td><%=info.getPass()%></td>
      <td><%=info.getSum() - info.getPass()%></td>
      <td><%=passrate%>%</td>
      <td class="last"><%=info.getTotalScore() / info.getSum()%></td>
    </tr>
    <%
      }
    %>
  </tbody>
</table>

<script src="../../common/jquery-1.3.2.min.js"></script>
<script src="../../common/fun.js"></script>
<script>
  var list = new KS.List("statlist")
  var list1 = new KS.List("statlist1")
</script>

</body>

</html>